/**
 * @author gao
 * @date 2025/8/3 21:36
 */

public class Demo1 {
    private static int sum = 0;
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            int ret = 0;
            for (int i = 1; i <= 100; i++) {
                ret += i;
            }
            sum = ret;
        });

        t1.start();
        t1.join();

        System.out.println(sum);
    }
}